NPL with Claude Code

Build NPL applications through natural conversation in your terminal. Describe what you want, and Claude Code writes secure, compliant protocols.

Why Claude Code Works Great with NPL

Terminal-Native Workflow

Stay in your terminal. Claude Code reads, writes, and edits files while you focus on describing what you need.

Compiler-Verified Output

Claude Code generates NPL code, and the compiler verifies security. If it compiles, the permission model is correct.

Conversational Development

Build through natural dialogue. Refine protocols iteratively by describing changes in plain English.

Full Project Context

Claude Code understands your entire project. It can read existing protocols and generate code that integrates seamlessly.

Getting Started

1

Install Claude Code

Install Claude Code CLI globally.

npm install -g @anthropic-ai/claude-code
2

Set up your NPL project

Install the NPL CLI and create a new project.

brew install NoumenaDigital/tools/npl
npl init --project-dir my-project
cd my-project
3

Start Claude Code

Launch Claude Code in your project directory.

claude
4

Describe what you want

Tell Claude Code what to build in plain English:

Example conversation:

> Create an application for a simple escrow where a buyer deposits funds, a seller delivers goods, and either party can dispute

Example Workflow

$ claude

> Create an NPL protocol for a subscription service with monthly billing.
  The service provider can create subscriptions, and subscribers can
  cancel at any time.

Creating subscription.npl...

> Add a permission for the provider to pause a subscription temporarily

Updating subscription.npl...

> Now run the compiler to check if the permissions are correct

Running: npl build
✓ Build successful. No permission errors.

> Deploy to NOUMENA Cloud

Running: npl deploy --tenant my-tenant --app my-app
✓ Deployed successfully

Pro Tips

Ask Claude to compile. After generating code, ask Claude Code to run npl build to verify the security model.

Iterate through conversation. Start simple and add complexity. "Add a timeout" or "What if the buyer disputes?"

Let Claude read existing code. Ask Claude Code to read your existing protocols before adding new ones. It will maintain consistency.

Use /help for NPL-specific commands. Claude Code can explain NPL concepts, show examples, and help debug compilation errors.

Ready to Build?

Install Claude Code and start building secure NPL applications through conversation.