Skip to main content

nctab

Terminal NC/G-code editor and toolkit for CNC programmers.

CI PyPI Python License: MIT uv Ruff

nctab demo

Features

  • TUI editor with a tool-section outline, file browser, live word/modal-state inspector, find & replace with preview, bookmarks, snippets and a command palette.
  • Safe by default — every transform prints a diff and writes nothing unless you pass -i / -o. Writes are atomic; --backup keeps a .bak.
  • Exact arithmetic — Decimal throughout; untouched lines round-trip byte for byte.
  • Transforms — renumber, strip, case, shift, scale, mirror, rotate, address math, feed/speed scaling, limited to a line, block or tool range.
  • Analysis — stats, tool list, 21 validation rules, NC-aware diff.
  • Machine profiles for Fanuc (mill/turn), Haas, Siemens ISO and generic ISO, plus your own TOML profiles.
  • CI-friendly — versioned --json output and meaningful exit codes.

Installation

Requires Python 3.13+.

uv tool install nctab      # or: pipx install nctab
# one-off, without installing:
uvx nctab --help

Optional DNC/serial support: uv tool install "nctab[dnc]".

Quick start

nctab part.nc                              # open the editor
nctab stats part.nc                        # summary: axes, codes, tools, feeds
nctab check part.nc --strict               # validate; non-zero exit on problems
nctab shift part.nc --z -0.02              # preview the change as a diff
nctab shift part.nc --z -0.02 -o part_z.nc # write it
nctab diff --ignore-n old.nc new.nc        # compare ignoring block numbers

Documentation

Guide Contents
Editor Layout, key bindings, find & replace
CLI reference All commands, ranges, JSON output, exit codes
Configuration Config layers, machine profiles, snippets
Architecture Package layout and design rules
Development Setup, testing, releasing

Contributing

Contributions are welcome — please read CONTRIBUTING.md and the Code of Conduct. Security issues: see SECURITY.md. Changes are tracked in CHANGELOG.md.

License

MIT © 0ndrec

Metadata

Release files for nctab 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nctab 0.1.1
File Size Uploaded
nctab-0.1.1.tar.gz 77.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nctab 0.1.1
File Interpreter ABI Platform
nctab-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 185.1 kB

Release files / nctab-0.1.1.tar.gz

Download URL nctab-0.1.1.tar.gz
Size 77.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ad5e0698e6f3d91601cbef2c0808baf7584da32224e2c87a1b5dc16e6931d929
BLAKE2b-256 checksum
How to use checksums
775050846f2cb1dc8c5f0029ad7c70d88a08354057dbc366870b405528466b10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nctab-0.1.1-py3-none-any.whl

Download URL nctab-0.1.1-py3-none-any.whl
Size 107.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0a8bceb194f1430ff41ab081b40fde810e94478a6289f7c4787ac4e0b7c41f6
BLAKE2b-256 checksum
How to use checksums
25c17ed9ac78fe5fb002dfff4ca23a5d5130ef0e3e818cd355e4b3960bad2f91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.2.0

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page