Development
Contributing to Agent Harbor and setting up the development environment.
Prerequisites
- Nix with flake support enabled
- Git
Clone and Setup
git clone https://github.com/blocksense-network/agent-harbor.git
cd agent-harbor
direnv allow # or: nix developRepository Structure
agent-harbor/
├── apps/ # Applications
│ └── docs.agent-harbor.com/ # Documentation site
├── crates/ # Rust crates
│ ├── ah-cli/ # CLI implementation
│ ├── ah-tui/ # TUI implementation
│ ├── ah-core/ # Core logic
│ ├── ah-agents/ # Agent implementations
│ └── ...
├── specs/ # Specifications
│ └── Public/ # Public specs
└── tests/ # Test suitesCommon Commands
Build
# Check for compilation errors
just check
# Build ah binary (debug)
cargo build --bin ah
# Build ah binary (release)
cargo build --release --bin ahTest
# Run all Rust tests
just test-rust
# Run a single test
just test-rust-single test_nameLint
# Lint Rust code
just lint-rust
# Run pre-commit checks
pre-commit runRun TUI in Dev Mode
just manual-test-tuiDocumentation Site
Run Locally
yarn workspace @agent-harbor/docs.agent-harbor.com devBuild
yarn workspace @agent-harbor/docs.agent-harbor.com buildAdd a Page
- Create
app/<section>/<page>/page.mdx - Update
app/<section>/_meta.tsif needed - Use MDX components as needed
Code Style
- Rust: Follow
rustfmt.tomland clippy lints - TypeScript: ESLint + Prettier
- Documentation: Clear headings, code examples, concise text
Pull Request Process
- Create a feature branch
- Make your changes
- Run tests:
just test-rust - Run linter:
just lint-rust - Run pre-commit:
pre-commit run - Submit PR
Specifications
Detailed specifications are in specs/Public/:
| Spec | Description |
|---|---|
CLI.md | CLI command reference |
TUI-PRD.md | TUI product requirements |
Configuration.md | Configuration system |
Docs-Site-PRD.md | Documentation site requirements |