Important
Read README.md for project overview and SECURITY.md for security guidelines.
- Go 1.25+ (see go.mod)
- Clean Architecture (
cmd/→cli/→internal/→pkg/) - Minimal dependencies (prefer standard library)
cmd/- Entry point (main.go)cli/- CLI flags and root command (urfave/cli/v3)internal/application/- Use cases per exec-platforminternal/domain/- Domain entities and rulesinternal/infrastructure/- Repositories that drive telnet/ssh sessionsinternal/framework/- Cross-cutting framework codeinternal/config/- Runtime configurationpkg/{telnet,ssh,errors}/- Reusable transport and error packages
Install required tools (one-time):
go install gotest.tools/gotestsum@latestgolangci-lint- See https://golangci-lint.run/docs/welcome/install/local//goreleaserrelease builds (see .goreleaser.yml)pre-commit installwiresgolangci-lint,gofmt,markdownlint-cli2,gitleaks(see .pre-commit-config.yaml)
Make targets (Makefile):
make build- Build binary intotmp/teleemake lint-golangci-lint run+go mod tidymake test-unit- run unit tests viagotestsumwith coveragemake test-unit-coverage- generate HTML coverage report atcoverage/report.htmlmake clean- remove build artifacts
gofmtandgolangci-lintare enforced by the pre-commit hook (see .pre-commit-config.yaml).- Follow .github/instructions/go.instructions.md for idiomatic Go.
- Run
make test-unitbefore committing. - Place tests next to code under test (
*_test.go). - Coverage threshold is enforced by .github/workflows/go-test-coverage.yml.
- Use Conventional Commits (
feat:,fix:,chore(deps):, etc.). - Sign off commits with
Signed-off-by:(DCO). - Open PRs against
main. CI runs lint, tests, and CodeQL.
Network devices have unique prompt patterns and privilege modes.
Reference internal/application/usecases/ and internal/infrastructure/repositories/:
- Cisco IOS/IOS-XE: Enable mode password required, prompt
>→# - Cisco NX-OS: Similar to IOS, different paging commands
- Cisco ASA: No paging support in user mode
- Cisco AireOS: No enable mode, WLC-specific prompts
- Juniper SRX/SSG: CLI vs config mode, prompts
>/# - YAMAHA RT: Japanese vendor, unique syntax
- .github/instructions/go.instructions.md - Idiomatic Go practices
- .github/instructions/markdown.instructions.md - CommonMark (0.31.2)
- .github/instructions/markdown-gfm.instructions.md - GitHub-flavored Markdown
- .github/instructions/github-actions-ci-cd-best-practices.instructions.md - GitHub Actions CI/CD best practices