Skip to content

Rename project from netkit to net-worker and CLI command to nw #3

@mischadiehm

Description

@mischadiehm

Project Rename: netkit → net-worker

Overview

Rename the project from "netkit" to "net-worker" to better reflect its purpose and avoid potential naming conflicts. Update the CLI command from netkit to nw for improved usability and prepare for professional PyPI distribution.

Requirements

1. Project Identity Changes

  • Update project name from "netkit" to "net-worker" in all documentation
  • Change CLI command from netkit to nw
  • Update package name for PyPI distribution as "net-worker"
  • Ensure proper attribution to narrowin organization

2. Core Configuration Changes

pyproject.toml Updates

  • Update name = "net-worker" (currently "network-toolkit")
  • Update description to reflect new name
  • Update console script entry point: nw = "network_toolkit.cli:app" (currently netkit = "network_toolkit.cli:app")
  • Update project URLs to point to narrowin/net-worker
  • Add proper author information for narrowin organization
  • Update keywords and classifiers for professional PyPI presentation

3. Documentation Files (78+ references found)

README.md - Major Updates Required

  • Update title from "Network Toolkit (netkit)" to "Network Toolkit (net-worker)"
  • Replace all 50+ command examples from netkit to nw
  • Update installation instructions
  • Update usage examples and help text references

GitHub Documentation

  • .github/copilot-instructions.md: 20+ references to update
  • .github/ISSUE_TEMPLATE/bug_report.md: Version reference update

4. Shell Completion Scripts - Complete Overhaul

File Renaming Required

  • shell_completion/bash_completion_netkit.shbash_completion_nw.sh
  • shell_completion/fish_completion_netkit.fishfish_completion_nw.fish
  • Update shell_completion/zsh_completion_netkit.zsh for nw command

Content Updates

  • Update all function names from _netkit to _nw
  • Update completion command references
  • Update help text and descriptions
  • Update shell_completion/install_completion.sh with new script names

5. Source Code Analysis

CLI and Application Code

  • Search all Python files for "netkit" references in help text
  • Update CLI app name and descriptions in src/network_toolkit/cli.py
  • Update error messages that reference "netkit"
  • Update logger names if they reference "netkit"
  • Check configuration file references

Test Files

  • Update test files that reference CLI command names
  • Update mock objects and test data
  • Ensure all CLI invocations use nw instead of netkit

6. PyPI Distribution Setup

Package Metadata

  • Name: net-worker
  • Author: narrowin
  • Description: Modern async Python toolkit for network device automation
  • Keywords: network, automation, mikrotik, routeros, cli, async, narrowin
  • Classifiers:
    • Development Status :: 5 - Production/Stable
    • Environment :: Console
    • Intended Audience :: System Administrators
    • Intended Audience :: Telecommunications Industry
    • License :: OSI Approved :: Apache Software License
    • Operating System :: OS Independent
    • Programming Language :: Python :: 3
    • Programming Language :: Python :: 3.11
    • Programming Language :: Python :: 3.12
    • Topic :: System :: Networking
    • Topic :: System :: Systems Administration
    • Topic :: Utilities

Project URLs

7. Environment Variables and Configuration

Check for Environment Variable References

  • Search for NETKIT_* environment variables
  • Update to NW_* or NET_WORKER_* naming convention
  • Update documentation for environment variables

8. CI/CD and Build Configuration

  • Update any GitHub Actions workflows that reference old names
  • Update build scripts and configuration
  • Verify package build process works with new name

Detailed File Analysis

Files with Multiple References (Priority Order)

  1. README.md - 78+ references

    • Command examples throughout
    • Installation instructions
    • Usage documentation
    • Help text examples
  2. shell_completion/fish_completion_netkit.fish - 30+ references

    • Function definitions
    • Command completions
    • Help descriptions
  3. shell_completion/bash_completion_netkit.sh - Extensive references

    • Completion functions
    • Command parsing
    • Option handling
  4. .github/copilot-instructions.md - 20+ references

    • Command examples
    • Usage patterns
    • Tool descriptions

Implementation Strategy

Phase 1: Core Configuration

  1. Update pyproject.toml with new package metadata
  2. Test package building with new configuration

Phase 2: Shell Completion

  1. Rename completion script files
  2. Update all internal references
  3. Test completion functionality

Phase 3: Documentation

  1. Update README.md with find/replace
  2. Update GitHub documentation
  3. Verify all examples work

Phase 4: Source Code

  1. Search for any hardcoded references
  2. Update CLI help text and error messages
  3. Update test files

Phase 5: Validation

  1. Build and test package locally
  2. Verify nw command works identically to netkit
  3. Test shell completion
  4. Run full test suite

Success Criteria

  • Package builds successfully as "net-worker"
  • CLI command nw works identically to previous netkit command
  • All shell completion scripts work with nw command
  • All tests pass without modification
  • No remaining "netkit" references in user-facing content
  • PyPI package page shows professional presentation with narrowin attribution
  • Documentation is complete and accurate

Migration Considerations

  • This is a breaking change for existing users
  • Consider adding deprecation warning for netkit command temporarily
  • Update semantic version appropriately (major version bump)
  • Provide clear migration documentation

Search Commands for Implementation

# Find all netkit references
grep -r "netkit" . --exclude-dir=.git --exclude-dir=__pycache__

# Find specific file types
find . -name "*.py" -exec grep -l "netkit" {} \;
find . -name "*.md" -exec grep -l "netkit" {} \;
find . -name "*.sh" -exec grep -l "netkit" {} \;
find . -name "*.fish" -exec grep -l "netkit" {} \;
find . -name "*.yml" -exec grep -l "netkit" {} \;
find . -name "*.yaml" -exec grep -l "netkit" {} \;

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions