Rust Agents

CLI Arguments Generator in Rust

Build a universal utility that transforms natural language tasks into precise command-line arguments.

CLI Arguments Generator in Rust cover

What You'll Build

You'll build a universal command-line companion that understands natural-language requests and turns them into the exact arguments for the tool you're already using. Say "drop the last commit" while invoking it for Git and it proposes git reset --soft HEAD^, ready to run.

The utility works as a plus-suffixed wrapper you can call alongside your everyday commands (think git+, ffmpeg+, rg+), always showing a clear preview and asking for confirmation before executing. It makes powerful actions quick, transparent, and safe.

Learning Objectives

  • Set up a Rust project with async capabilities

  • Parse command-line arguments using the plus-suffix convention

  • Craft and fill a prompt template for an LLM

  • Integrate with an OpenAI-compatible API via the rig crate

  • Split LLM output into shell-safe arguments

  • Spawn and manage child processes asynchronously

  • Propagate exit codes for correct pipeline behavior

  • Add an interactive confirmation dialog for safety

Prerequisites

  • Basic Rust syntax (structs, impl blocks, Result)

  • Familiarity with Cargo and dependencies

  • Understanding of async/await concepts

  • Basic command-line experience

Course curriculum

1 Binary Setup and Parsing

  • Initialize CLI App
  • Extract Command Name

2 Prompt to Parameters

  • Add Prompt Template
  • Fill Prompt Template
  • Send Prompt to Model

3 Confirm Command Execution

  • Confirm Command
  • Execute Confirmed Command

4 Release Build and Alias

  • Install Release Binary
  • Run the Tool

Technologies

Rust CLI LLM OpenAI Prompt Engineering Async Tokio Process Management Shell Parsing Code Generation

FAQ

Is this a video course?

No. You implement the project yourself, step by step, right in your browser — with a full reference solution for every step when you get stuck.

Do I need to install anything?

No. The playground runs entirely in your browser — no toolchain or local setup required.

Can I try it before subscribing?

Yes. Preview steps are available without a subscription so you can see the format and quality first.

What do I get with full access?

Every step unlocked, the Workbench app, a snapshot for each step, jump-to-any-step navigation, and all new playground releases.

Does it work with an AI agent like Claude or Codex?

Yes. You can work through a playground solo or alongside an AI agent.

Is there reference code?

Yes. Every step has a complete reference solution you can compare against.