npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@jarvis.ai.chief/jarvis-cli

v1.1.0

Published

JARVIS CLI - Command-line interface for business automation, scripting, and fine-grained control

Downloads

13

Readme

JARVIS CLI

Command-line interface for JARVIS - AI-powered business automation platform with scripting capabilities, cross-platform support, and fine-grained control.

Features

  • Power User Control: Fine-grained control over logs, errors, and JARVIS behavior
  • Business Automation: Run agents, manage tasks, notes, reminders, and approvals
  • Cross-Platform: Works on macOS, Linux, and Windows
  • Secure Authentication: Uses system keychain for token storage
  • Multi-Business Support: Switch between business contexts seamlessly
  • iPhone Integration: HTTP bridge daemon for iOS Shortcuts
  • Scriptable: All commands can be automated and scripted
  • Fast & Lightweight: Minimal overhead, instant command execution

Installation

Quick Install (Recommended)

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/yourorg/jarvis/main/packages/cli/scripts/install.sh | bash

Windows (PowerShell):

iwr https://raw.githubusercontent.com/yourorg/jarvis/main/packages/cli/scripts/install.ps1 -useb | iex

Homebrew (macOS)

brew tap jarvis-ai/tap
brew install jarvis-cli

npm / pnpm

# npm
npm install -g @jarvis/cli

# pnpm
pnpm add -g @jarvis/cli

# yarn
yarn global add @jarvis/cli

Download Pre-built Binaries

Download the latest release for your platform from GitHub Releases:

  • macOS (ARM64): jarvis-v1.0.0-macos-arm64.tar.gz
  • macOS (Intel): jarvis-v1.0.0-macos-x64.tar.gz
  • Linux (x64): jarvis-v1.0.0-linux-x64.tar.gz
  • Linux (ARM64): jarvis-v1.0.0-linux-arm64.tar.gz
  • Windows (x64): jarvis-v1.0.0-windows-x64.zip

Then extract and run the included install script:

# macOS / Linux
tar -xzf jarvis-*.tar.gz
cd jarvis-*
./install.sh

# Windows
# Extract the ZIP file, then:
.\install.ps1

From Source

git clone https://github.com/your-org/jarvis.git
cd jarvis/packages/cli
pnpm install
pnpm run build
npm link

Verify Installation

jarvis --version
jarvis --help

Quick Start

1. Authentication

Login to JARVIS:

jarvis auth login

This opens your browser for OAuth device flow authentication. Check your authentication status:

jarvis auth status

2. Business Context

List your businesses:

jarvis business list

Switch to a business:

jarvis business use <business-id>

Or use interactive selection:

jarvis business use

3. Run an Agent

Run an agent with input:

jarvis run <agent-id> --input "Your task here"

Or use interactive mode:

jarvis run

Watch task progress in real-time:

jarvis run <agent-id> --input "Task" --watch

Commands

Authentication

jarvis auth login              # Login to JARVIS
jarvis auth status             # Check authentication status
jarvis auth logout             # Logout from JARVIS

Business Management

jarvis business list           # List all businesses
jarvis b ls                    # Alias for list

jarvis business use [id]       # Switch to business context
jarvis b use                   # Interactive selection

jarvis business create         # Create new business
jarvis b create --name "My Business"

jarvis business current        # Show current business

Running Agents

jarvis run [agent-id]          # Run an agent
jarvis run --input "Task"      # Provide input directly
jarvis run --watch             # Watch task progress
jarvis run --priority high     # Set task priority
jarvis run --dry-run           # Simulate without executing

Task Management

jarvis tasks list              # List all tasks
jarvis t ls --status running   # Filter by status
jarvis t ls --limit 50         # Limit results

jarvis tasks get <id>          # Get task details
jarvis t get <task-id>

jarvis tasks cancel <id>       # Cancel a running task

Notes

jarvis notes create            # Create a note
jarvis n add "Note text"       # Create with text
jarvis n add "Note" --tags "work,important"

jarvis notes list              # List all notes
jarvis n ls --tags work        # Filter by tags
jarvis n ls --limit 20

jarvis notes search "query"    # Search notes
jarvis notes delete <id>       # Delete a note

Reminders

jarvis reminders create                    # Create reminder
jarvis r add "Call John" --date "2024-01-15T14:00:00Z"
jarvis r add "Meeting" --date "tomorrow at 3pm"

jarvis reminders list                      # List reminders
jarvis r ls --status pending

jarvis reminders cancel <id>               # Cancel reminder

Approvals

jarvis approvals list          # List pending approvals
jarvis a ls

jarvis approvals approve <id>  # Approve a request
jarvis a approve <id> --comment "Looks good"

jarvis approvals reject <id>   # Reject a request
jarvis a reject <id> --reason "Insufficient budget"

Configuration

jarvis config list             # Show all configuration
jarvis config get <key>        # Get a value
jarvis config set <key> <val>  # Set a value
jarvis config path             # Show config file path

Configuration options:

  • apiUrl: JARVIS API URL (default: http://localhost:3000)
  • logLevel: Log level (debug, info, warn, error)
  • outputFormat: Output format (pretty, json, compact)
  • telemetryEnabled: Enable telemetry (true/false)

Health & Diagnostics

jarvis health                  # Check API health
jarvis doctor                  # Run diagnostics

iPhone Integration

JARVIS CLI includes an HTTP bridge daemon that enables iPhone Shortcuts integration.

Start the Daemon

jarvisd

Or specify port and host:

jarvisd --port 3939 --host 0.0.0.0

Setup iPhone Shortcut

  1. Start the daemon on your Mac: jarvisd
  2. Note the bridge token displayed in the terminal
  3. Find your Mac's local IP (shown in daemon output)
  4. Create a Shortcut on your iPhone:
    • Action: "Get Contents of URL"
    • URL: http://YOUR_MAC_IP:3939/run
    • Method: POST
    • Headers:
      {
        "Authorization": "Bearer YOUR_BRIDGE_TOKEN",
        "Content-Type": "application/json"
      }
    • Body:
      {
        "agentId": "YOUR_AGENT_ID",
        "input": "Your task here"
      }

Available Bridge Endpoints

POST   /run                    # Run an agent
GET    /tasks                  # List tasks
GET    /tasks/:id              # Get task details
POST   /notes                  # Create a note
GET    /notes                  # List notes
POST   /reminders              # Create a reminder
GET    /businesses             # List businesses

Scripting Examples

Bash Script: Auto-run Agent Daily

#!/bin/bash
# daily-report.sh

jarvis auth status || jarvis auth login
jarvis business use "my-business-id"
jarvis run "report-agent-id" --input "Generate daily report for $(date +%Y-%m-%d)"

Cron Job: Check Pending Approvals

# Check approvals every hour
0 * * * * jarvis approvals list | mail -s "Pending Approvals" [email protected]

Node.js Script: Automated Task Management

import { exec } from 'child_process';
import util from 'util';

const execPromise = util.promisify(exec);

async function processTasks() {
  // Get running tasks
  const { stdout } = await execPromise('jarvis tasks list --status running --json');
  const tasks = JSON.parse(stdout);

  // Cancel long-running tasks
  const oneHourAgo = Date.now() - 3600000;
  for (const task of tasks) {
    if (new Date(task.createdAt).getTime() < oneHourAgo) {
      await execPromise(`jarvis tasks cancel ${task.id}`);
      console.log(`Cancelled task ${task.id}`);
    }
  }
}

processTasks();

Python Script: Bulk Note Creation

import subprocess
import json

notes = [
    {"text": "Review Q4 metrics", "tags": ["work", "quarterly"]},
    {"text": "Prepare presentation", "tags": ["work", "urgent"]},
    {"text": "Schedule team meeting", "tags": ["work", "admin"]}
]

for note in notes:
    tags = ",".join(note["tags"])
    subprocess.run([
        "jarvis", "notes", "create",
        note["text"],
        "--tags", tags
    ])

Advanced Usage

Debug Mode

Enable verbose logging:

jarvis --debug tasks list

Or set it permanently:

jarvis config set logLevel debug

JSON Output

Get JSON output for scripting:

jarvis --json tasks list

Environment Variables

export JARVIS_API_URL=https://api.jarvis.com
export JARVIS_TELEMETRY_URL=https://telemetry.jarvis.com

Configuration File

JARVIS CLI stores configuration in ~/.jarvis/config.json:

{
  "apiUrl": "http://localhost:3000",
  "currentBusinessId": "clx...",
  "currentBusinessSlug": "my-business",
  "bridgeToken": "abc123...",
  "telemetryEnabled": false,
  "logLevel": "info",
  "outputFormat": "pretty"
}

Security

  • Keychain Storage: Access tokens stored in system keychain (macOS Keychain, Windows Credential Manager)
  • Auto-Refresh: Tokens automatically refreshed before expiration
  • Bridge Token: Unique token for iPhone integration, regenerated on demand
  • Secure Config: Config file permissions set to 0600 (owner read/write only)

Troubleshooting

Authentication Issues

# Check authentication status
jarvis auth status

# Re-login if token expired
jarvis auth logout
jarvis auth login

Connection Issues

# Check API health
jarvis health

# Run full diagnostics
jarvis doctor

# Check configuration
jarvis config list

Business Context Issues

# Verify current business
jarvis business current

# Re-select business
jarvis business use

Development

Building from Source

pnpm install
pnpm run build

Running Tests

pnpm test
pnpm test:watch
pnpm test:coverage

Linting & Formatting

pnpm lint
pnpm format

Creating Binaries

# Build everything (clean → bundle → binaries → installers)
pnpm run package

# Or step by step:
pnpm run build          # TypeScript compilation
pnpm run build:bundle   # Create optimized bundles with esbuild
pnpm run build:binaries # Create platform-specific binaries with pkg
pnpm run build:installers # Package into distributable archives

This creates standalone binaries in build/binaries/ for:

  • macOS (Intel & Apple Silicon)
  • Linux (x64 & ARM64)
  • Windows (x64)

And distributable packages in build/dist/:

  • jarvis-v{version}-macos-arm64.tar.gz
  • jarvis-v{version}-macos-x64.tar.gz
  • jarvis-v{version}-linux-x64.tar.gz
  • jarvis-v{version}-linux-arm64.tar.gz
  • jarvis-v{version}-windows-x64.zip
  • checksums.txt (SHA-256 hashes)

See DISTRIBUTION.md for detailed build and release documentation.

Support

  • Documentation: https://docs.jarvis.com/cli
  • Issues: https://github.com/your-org/jarvis/issues
  • Discussions: https://github.com/your-org/jarvis/discussions

License

MIT License - see LICENSE file for details