Documentation
¶
Overview ¶
Package tutorial provides an interactive, visually stunning tutorial for NTM
Index ¶
- Constants
- Variables
- func AnimatedBorder(content string, width int, tick int, colors []string) string
- func GlitchText(text string, tick int, intensity float64) string
- func MatrixRain(width, height int, tick int) string
- func ProgressDots(current, total int, tick int) string
- func PulseText(text string, tick int, baseColor string) string
- func RenderAgentsDiagram(tick int, width int) string
- func RenderAnimatedChaosDiagram(tick int, width int) string
- func RenderAnimatedLogo(tick int, width int) string
- func RenderAnimatedOrderDiagram(tick int, width int) string
- func RenderCelebration(tick int, width int) string
- func RenderCommandCode(commands []string, tick int, typewriter bool) string
- func RenderCommandFlowDiagram(tick int, step int, width int) string
- func RenderSessionDiagram(tick int, step int, width int) string
- func RenderTip(tip []string, tick int, width int) string
- func RenderWorkflowDiagram(tick int, activeStep int, width int) string
- func SparkleText(text string, tick int, density float64) string
- func TransitionEffect(content string, transitionType TransitionType, progress float64, ...) string
- func WaveText(text string, tick int, amplitude float64, colors []string) string
- type Model
- type Option
- type Particle
- type ParticleType
- type RevealAnimation
- type SlideID
- type SlideState
- type TickMsg
- type TransitionDoneMsg
- type TransitionType
- type TypingAnimation
Constants ¶
const SlideCount = 9
SlideCount is the total number of slides
Variables ¶
var AgentsDiagram = []string{
"",
" +----------------------------------------------------+",
" | AI AGENTS |",
" +----------------------------------------------------+",
"",
" [CC] Claude [COD] Codex [GMI] Gemini",
" ----------- ----------- ------------",
" Anthropic OpenAI Google",
" Architecture Implementation Testing",
" Design Code Gen Analysis",
"",
}
Agent types visualization
var CelebrationBanner = []string{
"",
" * * * * * * * * * * * * * * * * * * *",
"",
" YOU'RE READY!",
"",
" * * * * * * * * * * * * * * * * * * *",
"",
}
Celebration banner
var ChaosDiagram = []string{
" +---------+ +---------+ +---------+",
" | Claude | | Claude | | Codex |",
" | >_ | | >_ | | >_ |",
" +---------+ +---------+ +---------+",
" +---------+ +---------+",
" | Gemini | | Claude |",
" | >_ | | >_ |",
" +---------+ +---------+",
" +---------+ +---------+",
" | Codex | | Gemini |",
" | >_ | | >_ |",
" +---------+ +---------+",
}
Chaos diagram - multiple messy terminal windows
var CommandFlowDiagram = []string{
"",
" +-------------+",
" | ntm send |",
" | --all |",
" +------+------+",
" |",
" +-------------+-------------+",
" | | |",
" v v v",
" +--------+ +--------+ +--------+",
" | Claude | | Codex | | Gemini |",
" | (cc) | | (cod) | | (gmi) |",
" +--------+ +--------+ +--------+",
"",
}
Command flow diagram
var KeyboardDiagram = []string{
"",
" +------------------------------------------------------+",
" | KEYBOARD SHORTCUTS |",
" +------------------------------------------------------+",
"",
" Navigation Actions",
" ---------- -------",
" <- -> / h l Move slides s Skip animation",
" 1-9 Jump to slide r Restart slide",
" Home/End First/Last q Quit",
" Space Next slide ? Help",
"",
}
Keyboard shortcuts reference
var LogoExtraLarge = []string{
"",
" ██████ ██ ████████ ██████ ██████",
" ███░░██ ██ ░░░██░░░ ███░░██ ███░░██",
" ██ ░░██ ██ ██ ██ ░░████ ░██",
" ██ ░░███ ██ ██ ░░██ ██",
" ██ ░░██ ██ ██ ░░ ██",
" ██ ░██ ██ ██ ██",
" ░░ ░░ ░░ ░░ ░░",
"",
}
Extra large logo for welcome screen
var LogoLarge = []string{
"",
" ███╗ ██╗████████╗███╗ ███╗",
" ████╗ ██║╚══██╔══╝████╗ ████║",
" ██╔██╗ ██║ ██║ ██╔████╔██║",
" ██║╚██╗██║ ██║ ██║╚██╔╝██║",
" ██║ ╚████║ ██║ ██║ ╚═╝ ██║",
" ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝",
"",
}
Large NTM logo with extra flair
var OrderDiagram = []string{
" +-------------------------------------------------------+",
" | Session: myproject |",
" +-----------------+-----------------+-------------------+",
" | You (shell) | Claude #1 | Claude #2 |",
" | $ ntm send | [Working...] | [Ready] |",
" +-----------------+-----------------+-------------------+",
" | Codex #1 | Codex #2 | Gemini #1 |",
" | [Testing...] | [Complete] | [Analyzing] |",
" +-----------------+-----------------+-------------------+",
}
Order diagram - organized tmux session
var PaneLayoutDiagram = []string{
" +-----------------------------------------------------+",
" | Pane Naming: {session}__{agent}_{number} |",
" +-----------------------------------------------------+",
" | |",
" | myproject__cc_1 -> Claude agent #1 |",
" | myproject__cc_2 -> Claude agent #2 |",
" | myproject__cod_1 -> Codex agent #1 |",
" | myproject__gmi_1 -> Gemini agent #1 |",
" | |",
" +-----------------------------------------------------+",
}
Pane layout with agent assignments
var QuickStartCommands = []string{
"# Create a new project with agents",
"$ ntm quick myproject --template=go",
"$ ntm spawn myproject --cc=3 --cod=2 --gmi=1",
"",
"# Send prompts to your agents",
"$ ntm send myproject --all \"Build a REST API\"",
"",
"# Check status and manage",
"$ ntm status myproject",
"$ ntm view myproject",
}
Quick start commands
var SessionDiagram = []string{
" +=========================================================+",
" | TMUX SESSION: myproject |",
" +=========================================================+",
" | |",
" | +--------------+ +--------------+ +--------------+ |",
" | | Pane 0 | | Pane 1 | | Pane 2 | |",
" | | (You) | | (Claude) | | (Codex) | |",
" | | $ _ | | CC >_ | | COD >_ | |",
" | +--------------+ +--------------+ +--------------+ |",
" | |",
" +=========================================================+",
}
Session concept diagram
var Subtitle = "Orchestrate AI coding agents in parallel"
Subtitle
var Tagline = "Named Tmux Manager — Multi-Agent Command Center"
Tagline
var TipsContent = [][]string{
{
"[Tip #1] Start Small",
"",
"Begin with 1-2 agents per type.",
"Scale up as needed with `ntm add`.",
},
{
"[Tip #2] Divide & Conquer",
"",
"Use Claude for architecture,",
"Codex for implementation,",
"Gemini for testing & docs.",
},
{
"[Tip #3] Use the Palette",
"",
"Press F6 to open the command",
"palette with pre-built prompts.",
},
{
"[Tip #4] Save Your Work",
"",
"`ntm save myproject -o ~/logs`",
"captures all agent outputs.",
},
}
Tips content
var WorkflowDiagram = []string{
"",
" +============+ +============+ +============+",
" | DESIGN | --> | IMPLEMENT | --> | TEST |",
" | (Claude) | | (Codex) | | (Gemini) |",
" +============+ +============+ +============+",
" | | |",
" +------------------+------------------+",
" |",
" v",
" +------------+",
" | REVIEW |",
" | (All) |",
" +------------+",
"",
}
Workflow diagram
Functions ¶
func AnimatedBorder ¶
AnimatedBorder creates an animated border around content (ASCII only for alignment)
func GlitchText ¶
GlitchText creates a glitch effect on text
func MatrixRain ¶
MatrixRain creates a matrix-style rain effect for a given width/height
func ProgressDots ¶
ProgressDots creates animated progress dots
func RenderAgentsDiagram ¶
RenderAgentsDiagram renders the agents diagram with color coding
func RenderAnimatedChaosDiagram ¶
RenderAnimatedChaosDiagram renders the chaos diagram with shake effect
func RenderAnimatedLogo ¶
RenderAnimatedLogo renders the logo with animation
func RenderAnimatedOrderDiagram ¶
RenderAnimatedOrderDiagram renders the order diagram with glow effect
func RenderCelebration ¶
RenderCelebration renders the celebration with particles
func RenderCommandCode ¶
RenderCommandCode renders command code with syntax highlighting
func RenderCommandFlowDiagram ¶
RenderCommandFlowDiagram renders the command flow with animated arrows
func RenderSessionDiagram ¶
RenderSessionDiagram renders the session concept diagram
func RenderWorkflowDiagram ¶
RenderWorkflowDiagram renders the workflow with step highlighting
func SparkleText ¶
SparkleText adds occasional sparkle characters to text
func TransitionEffect ¶
func TransitionEffect(content string, transitionType TransitionType, progress float64, width, height int) string
TransitionEffect applies a transition effect between slides
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main tutorial Bubble Tea model
func (Model) GetCurrentSlide ¶
GetCurrentSlide returns the current slide ID
func (Model) IsTransitioning ¶
IsTransitioning returns whether a transition is in progress
type Option ¶
type Option func(*Model)
Option configures the tutorial model
func WithSkipAnimations ¶
func WithSkipAnimations() Option
WithSkipAnimations disables animations for faster navigation
func WithStartSlide ¶
WithStartSlide sets the starting slide
type Particle ¶
type Particle struct {
X, Y float64
VX, VY float64
Life int
MaxLife int
Type ParticleType
Char string
Color string
Size int
Gravity float64
Friction float64
}
Particle represents an animated particle
func NewParticle ¶
func NewParticle(x, y int, ptype ParticleType) Particle
NewParticle creates a new particle at the given position
type ParticleType ¶
type ParticleType int
ParticleType defines different particle effects
const ( ParticleSparkle ParticleType = iota ParticleStar ParticleConfetti ParticleFirework ParticleRain ParticleSnow ParticleGlow )
type RevealAnimation ¶
type RevealAnimation struct {
Lines []string
CurrentLine int
Speed int
RevealStyle string // "fade", "slide", "typewriter"
Done bool
}
RevealAnimation creates a line-by-line reveal effect
func NewRevealAnimation ¶
func NewRevealAnimation(lines []string, style string) *RevealAnimation
NewRevealAnimation creates a new reveal animation
func (*RevealAnimation) Render ¶
func (r *RevealAnimation) Render(tick int) string
Render returns the currently visible lines
func (*RevealAnimation) Update ¶
func (r *RevealAnimation) Update(tick int)
Update advances the reveal animation
type SlideState ¶
type SlideState struct {
// contains filtered or unexported fields
}
SlideState holds per-slide animation state
type TransitionDoneMsg ¶
type TransitionDoneMsg struct{}
TransitionDoneMsg signals a transition has completed
type TransitionType ¶
type TransitionType int
TransitionType defines how slides transition
const ( TransitionNone TransitionType = iota TransitionFadeOut TransitionFadeIn TransitionSlideLeft TransitionSlideRight TransitionZoomIn TransitionZoomOut TransitionDissolve )
type TypingAnimation ¶
type TypingAnimation struct {
Lines []string
CurrentChar int
Speed int // ticks per character
Cursor string
CursorBlink bool
Done bool
}
TypingAnimation creates a typing effect for text
func NewTypingAnimation ¶
func NewTypingAnimation(lines []string) *TypingAnimation
NewTypingAnimation creates a new typing animation
func (*TypingAnimation) Render ¶
func (t *TypingAnimation) Render(tick int) string
Render returns the currently visible text with cursor
func (*TypingAnimation) Update ¶
func (t *TypingAnimation) Update(tick int)
Update advances the typing animation