pub const TAGLINE: &str = "Web, Blockchain & AI";
pub const TAGLINE_FULL: &str = "Unified language for Web, Blockchain & AI";
pub fn version() -> &'static str {
env!("CARGO_PKG_VERSION")
}
pub fn print_banner(bin: &str, no_banner: bool, quiet: bool) {
if no_banner {
return;
}
if quiet {
println!("{} v{} — {}", bin, version(), TAGLINE);
return;
}
println!();
println!("┌──────────────────────────────────────────────────────────────────────┐");
println!("│ {} v{} — {} │", bin, version(), TAGLINE_FULL);
println!("└──────────────────────────────────────────────────────────────────────┘");
println!();
}
pub fn help_content(bin: &str) -> String {
format!(
r#"
GET STARTED
new <name> [--type <type>] Create a new project
Types: ai, iot, agent, chain, web, cli, lib
init Initialize DAL in current directory
run <file.dal> Run a DAL file
test [file.test.dal] Run tests
BUILD & DEVELOP
check <file.dal> Type check without executing
fmt <file.dal> [--check] Format code (--check for CI)
lint <file.dal> Lint for issues
watch <file.dal> Re-run on changes
repl Interactive REPL
bench [file] [--suite name] Run benchmarks
profile <file> [--memory] Profile execution
optimize <file> [-o out] Apply AST optimizations
AI & CODE ASSISTANCE
ai code "<prompt>" Generate DAL from natural language
ai code "<p>" -o <file> Generate and save to file
ai explain <file> Explain what code does
ai review <file> Code review with suggestions
ai audit <file> Security audit for contracts
ai test <file> Generate test cases
ai fix <file> Suggest fixes for issues
ai optimize-gas <file> Gas optimization suggestions
AGENTS & AUTOMATION
agent create <type> <name> Create AI/system/worker agent
agent send <from> <to> <msg> Send message between agents
agent list List agents
agent mold Molds and reusable configs
BLOCKCHAIN
chain list List supported chains
chain gas-price <id> Get gas price
chain balance <id> <addr> Get address balance
chain mint <name> Mint asset
chain asset <id> Get asset info
ORCHESTRATION (bond, pipe, invoke)
bond <flow> <args...> Connect components (iot-to-db, auth-to-web, ...)
pipe <source> -> <sink> Pipeline between components
invoke <workflow> <args...> Multi-step workflows (compliance-check, ai-audit, ...)
DATA & INFRASTRUCTURE
crypto hash <data> [alg] Hash (sha256/sha512)
crypto keygen [alg] Generate keypair
db connect <conn> Test database connection
db query <conn> "<sql>" Execute query
cloud authorize | grant Cloud RBAC and audit
DEVICES & IoT
iot register <name> Register device
iot status <device_id> Device status
iot ai-predict <device> Predictive maintenance
TOOLS
web <file.dal> Run web app
web get <url> HTTP GET
convert <input.sol> [-o out] Solidity to DAL
doc <file.dal> [--open] Generate documentation
completions [bash|zsh|fish] Shell completions
add <package> Add dependency to dal.toml
install [--sync] Install dependencies (--sync: add from .dal usage)
venv create|list|show|run|delete Virtual environments (root + profile)
INFO
help This message
version Version information
QUICK EXAMPLES
{0} bond iot-to-db dev_001 postgres://localhost/db
{0} pipe oracle fetch x btc -> chain estimate 1 deploy
{0} invoke compliance-check 0x742d...
{0} run app.dal
For subcommand help: {0} <command> --help
"#,
bin
)
}