Skip to content

prajjwalkumar17/Niyam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Niyam

Niyam

Approval-first command control for AI agents and operator teams.

Self-hosted. Policy-aware. Wrapper-capable. Audit-heavy.

Why Niyam Deck · Local Setup · Individual Setup · Team Setup · CLI Wrapper · Testing · Usage · API · Deployment · Features

Niyam dashboard

Why It Exists

Public deck: prajjwalkumar17.github.io/Niyam

AI agents are useful right up until they become invisible shells with too much reach.

Niyam gives teams one explicit control layer between:

  • the system that wants to run a command
  • the machine that would otherwise execute it blindly

So you can decide:

  • how risky a command is
  • whether it needs approval
  • whether it runs DIRECT or through a wrapper
  • how it gets audited, redacted, and recovered

What You Get

  • policy simulation before submission
  • interactive CLI wrapper for shell-native usage
  • explicit individual and teams product modes
  • dashboard-managed CLI tokens for standalone identities and per-user toolchains
  • per-user and per-standalone-token auto-approval with a synthetic auditable auto-approver
  • optional team mode with local users and admin-approved signup
  • approvals for LOW, MEDIUM, and HIGH
  • rule-driven DIRECT vs WRAPPER
  • built-in policy templates for gh, git, docker, kubectl, and terraform
  • redacted history and audit data with encrypted raw execution payloads
  • smoke tests, backups, restore, and operator tooling

Examples:

  • ls public can auto-run as LOW
  • git merge can require approval and still stay DIRECT
  • gh workflow run can require approval and resolve to WRAPPER
  • rm -rf build can pause in the shell, show approval 1/2 recorded, and continue only after two distinct approvers sign off

Product Preview

Rules and pack templates

Niyam rules and templates

Policy catalog

Niyam policy catalog

Audit trail

Niyam audit log

Quick Start

npm install
NIYAM_ADMIN_PASSWORD=change-me NIYAM_EXEC_DATA_KEY=local-dev-key npm start

Open http://localhost:3000 and sign in with:

  • username: admin
  • password: the value of NIYAM_ADMIN_PASSWORD

Want guided setup instead?

./oneclick-setup.sh

Oneclick now asks which product mode you want:

  • Individual: use dashboard-managed standalone token identities such as June or January
  • Teams: keep real local dashboard users and optionally let each user create their own CLI tokens

Windows users should start with Local setup, which includes both WSL and native PowerShell paths.

Start Here

  • Local setup: macOS, Linux, Windows, oneclick flow, token seeding, and curl examples
  • Individual setup: one-person setup with standalone managed token identities for each CLI
  • Team setup: shared rollout with local users, self-service CLI tokens, and high-risk dual approval workflows
  • CLI wrapper: install, auth precedence, login --token, login --username, logout, niyam-on, niyam-off, and removal commands
  • Usage guide: approvals, packs, wrapper mode, operator flow
  • Feature guide: simulation, templates, redaction
  • API reference: endpoints and payloads

Identity Model

Niyam now supports two first-class deployment modes.

Individual

  • the dashboard still uses only the bootstrap admin account
  • local-user workflows and user-linked token flows stay dormant while individual mode is active
  • CLI and agent access uses dashboard-generated standalone managed tokens
  • each token can carry its own identity label, so separate CLIs show up as June, January, and so on

Teams

  • humans keep local dashboard accounts with username and password
  • admins can create an initial CLI token for any user
  • each local user can later create and block their own CLI tokens from Workspace
  • each local user can enable or disable their own auto-approval mode from Workspace
  • audit and history show the effective user plus the token label, for example alice via Cursor CLI

Auto Approval

Niyam now supports approval automation without losing auditability.

  • LOW risk stays policy auto-approved
  • MEDIUM risk can be auto-approved when the submitting user or standalone token has auto approval enabled
  • HIGH risk gets one approval from niyam-auto-approver and still needs one distinct human approver
  • the synthetic auto-approver is recorded in approvals, history, and audit

Managed tokens are now the CLI and API auth path for operators, standalone identities, and user-linked workflows.

Operator Docs

Built-In Templates

Installable starting points for:

  • gh
  • git
  • docker
  • kubectl
  • terraform

These help teams start from sane defaults instead of writing every rule from scratch.

Upcoming Channels

Planned approval surfaces:

  • Slack
  • Discord
  • chat-driven approve or reject flows with rationale capture

Niyam stays the system of record while approvals move closer to where teams already collaborate.

Verify

npm run verify

More:

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors