renamed to chipnut

This commit is contained in:
Chipperfluff 2026-04-04 12:02:15 +02:00
parent 120647f7ec
commit c2b842c475
16 changed files with 17 additions and 17 deletions

View File

@ -1,7 +1,7 @@
include setup.py
include README.md
recursive-include nut/templates *
recursive-include chipnut/templates *
global-exclude __pycache__/
global-exclude *.py[cod]

View File

@ -2,12 +2,12 @@ from .cli import CLI
from .config import ConfigError, load_config
from .commands.setup import is_nut_workspace, find_template_conflicts, copy_template_files
from .commands.setup import is_chipnut_workspace, find_template_conflicts, copy_template_files
from .commands.compiler import compile as compile_project
def help_text():
return [
"%bold%%cyan%nut CLI: tiny shell, big squirrel energy :3%reset%",
"%bold%%cyan%chipnut CLI: tiny shell, big squirrel energy :3%reset%",
]
def main() -> int:
@ -15,9 +15,9 @@ def main() -> int:
cli.command(
"init",
help="Create an empty nut workspace or reinitialize with --force",
help="Create an empty chipnut workspace or reinitialize with --force",
description=(
"Initialize a nut development workspace by creating a Nutfile and default project files. "
"Initialize a chipnut development workspace by creating a Nutfile and default project files. "
"If a Nutfile already exists, initialization should fail unless --force is used."
),
).flag(
@ -61,8 +61,8 @@ def cmd_build(args, flags) -> int:
build_folder_override = flags["build_folder"]
file_name_override = flags["name"]
if config_path == "Nutfile" and not is_nut_workspace():
print("Error: No Nutfile found. Please run 'nut init' to create a workspace.")
if config_path == "Nutfile" and not is_chipnut_workspace():
print("Error: No Nutfile found. Please run 'chipnut init' to create a workspace.")
return 1
try:

View File

@ -117,7 +117,7 @@ class _CommandSpec:
class CLI:
def __init__(
self,
prog: str = "nut",
prog: str = "chipnut",
help_callback: Optional[Callable[[], Iterable[str]]] = None,
):
self.prog = prog

View File

@ -4,10 +4,10 @@ from typing import Optional
import shutil
from nut.config import Config
from nut.paths import get_templates_path
from nut.utils import zip_dir
from nut.logger import logger
from ..config import Config
from ..paths import get_templates_path
from ..utils import zip_dir
from ..logger import logger
@dataclass(frozen=True)
class CompileContext:

View File

@ -1,4 +1,4 @@
from nut.paths import get_templates_path
from ..paths import get_templates_path
import shutil
import os
@ -43,5 +43,5 @@ def copy_template_files(dest_dir: str, force: bool = False, checked: bool = Fals
dirs_exist_ok=True
)
def is_nut_workspace(path: str = ".") -> bool:
def is_chipnut_workspace(path: str = ".") -> bool:
return os.path.isfile(os.path.join(path, "Nutfile"))

View File

@ -1,9 +1,9 @@
from setuptools import find_packages, setup
setup(
name="nut",
name="chipnut",
version="0.1.0",
description="Core package and CLI entrypoint for nut",
description="Core package and CLI entrypoint for chipnut",
author="Chipperfluff",
packages=find_packages(),
include_package_data=True,