-q, --quiet Suppress info messages (only show warnings/errors)-d, --debug Enable verbose debug logging-v, --verbose Show detailed execution information--timeout <seconds> Maximum execution time in seconds (default: 300)-C, --directory <path> Run as if agentuse was started in <path> instead of the current directory--env-file <path> Path to custom .env file-m, --model <model> Override the model specified in the agent file
The --quiet and --debug options cannot be used together.
The -C or --directory option changes the working directory before running:
Copy
# Without -C: runs from current directoryagentuse run agent.agentuse# With -C: changes to specified directory first (like cd)agentuse run agent.agentuse -C /path/to/project
# Override with OpenAI GPT-5agentuse run agent.agentuse --model openai:gpt-5# Use Anthropic Claude Haiku for quick testingagentuse run agent.agentuse -m anthropic:claude-3-5-haiku-latest# Use different API key via environment suffixagentuse run agent.agentuse --model openai:gpt-4o:dev# This will use OPENAI_API_KEY_DEV instead of OPENAI_API_KEY# Use specific environment variableagentuse run agent.agentuse --model anthropic:claude-3-5-sonnet:ANTHROPIC_API_KEY_PERSONAL
When overriding models, provider-specific options (like OpenAI’s reasoningEffort)
will be ignored if you switch to a different provider.
Model overrides propagate to all sub-agents. When you use --model, both the parent
agent and all its sub-agents will use the specified model, regardless of what models
are defined in their individual agent files.
HTTPS Only: Only HTTPS URLs are allowed for security
File Extension: Remote agents must have .agentuse extension
Interactive Confirmation: AgentUse will show a security warning with options:
[p]review - Fetch and display the agent content before running
[y]es - Execute the agent directly
[N]o - Abort execution (default)
Example security prompt:
Copy
⚠️ WARNING: You are about to execute an agent from:https://example.com/agent.agentuseOnly continue if you trust the source and have audited the agent.[p]review / [y]es / [N]o:
# Run agent from current directoryagentuse run hello.agentuse# Run agent from subdirectorycd agents/subfolderagentuse run my-agent.agentuse # Finds .env and plugins at project root# Change to different directory first with -Cagentuse run agent.agentuse -C /my/project # Same as: cd /my/project && agentuse run agent.agentuse# Run agent from a different projectagentuse run newsletter/writer.agentuse -C ~/projects/content# Use custom environment fileagentuse run agent.agentuse --env-file .env.production# Run with additional promptagentuse run assistant.agentuse "Help me write an email"# Run with multi-word promptagentuse run code-review.agentuse "focus on security and performance issues"# Run remote agent (requires HTTPS and .agentuse extension)# Shows security warning and requires confirmationagentuse run https://example.com/agent.agentuse# Run remote agent with additional promptagentuse run https://example.com/agent.agentuse "use production settings"# Run with debug outputagentuse run agent.agentuse --debug# Run with additional prompt and verbose outputagentuse run agent.agentuse "be thorough" --verbose# Run with custom timeoutagentuse run agent.agentuse --timeout 600# Run quietly (only warnings/errors)agentuse run agent.agentuse --quiet# Override model at runtimeagentuse run agent.agentuse --model openai:gpt-5-mini# Override model and add promptagentuse run agent.agentuse "be concise" --model anthropic:claude-3-5-haiku-latest# Use development API key with model overrideagentuse run agent.agentuse -m openai:gpt-4o:dev# Override model for agent with sub-agents (all will use the same model)agentuse run orchestrator.agentuse --model openai:gpt-5-mini
agentuse run <file> [prompt...] # Run an agent with optional promptagentuse auth login [provider] # Authenticate with a provideragentuse auth logout [provider] # Remove stored credentialsagentuse auth list # Show authentication statusagentuse auth help # Show detailed auth helpagentuse --version # Show versionagentuse --help # Show help
# Pipe input to agentecho "Translate this to Spanish" | agentuse run translator.agentuse# Pipe agent outputagentuse run generator.agentuse | tee output.txt# Chain agentsagentuse run analyzer.agentuse < data.txt | agentuse run summarizer.agentuse
If you see authentication errors, AgentUse will show specific guidance:
Copy
[ERROR] No API key found for anthropicTo authenticate, run: agentuse auth loginOr set your API key: export ANTHROPIC_API_KEY='your-key-here'For more options: agentuse auth --help
Timeout issues
Increase timeout for long-running agents:
Copy
agentuse run agent.agentuse --timeout 600# or via environmentMAX_STEPS=2000 agentuse run agent.agentuse