Skip to main content

Generate new projects from git repositories

Project description

new

Build Release

Generate new projects from git repositories

new is a command to create new projects based on existing git repos. It simply shallow clones a repository to a directory with your specified new project name, and cleans up the git files like they were never there. It also supports string replacement.

Usage

You can create new project from any github repository with just the username and project name

The following command will create a new project for you based on this one:

new myNewProject divanvisagie/new

You can also specify a URL to any git repository that you have access to:

new myNewProject git@gitlab.com:divan/new.git

These examples are just simple clones though, new also lets authors configure a repository so that it will prompt you to replace strings that you may want to rename for your project.

You can give it a try with:

new myNewProject divanvisagie/kotlin-tested-seed

You will see that it prompts you to replace the package name, just pressing enter will skip this and keep the name:

> new myNewProject divanvisagie/kotlin-tested-seed
Creating testbed from https://github.com/divanvisagie/kotlin-tested-seed.git 
Enumerating objects: 14, done.
Counting objects: 100% (14/14), done.
Compressing objects: 100% (9/9), done.
Total 14 (delta 0), reused 10 (delta 0), pack-reused 0

Enter replacement text for com.divanvisagie.example

    text       : com.divanvisagie.example
    description: The package name

> com.divanvisagie.mynewproject

The reason we see this is because the kotlin-tested-seed repository contains a .new.yml file at its root:

replace:
  strings:
    - match: com.divanvisagie.example
      description: The package name 

You can configure as many match strings as you want in your own seed projects.

Installation Options

Windows

First install scoop

scoop bucket add divanvisagie https://github.com/divanvisagie/scoop-bucket
scoop install new

macOS

First install homebrew

brew tap divanvisagie/homebrew-tap
brew install divanvisagie/homebrew-tap/new

Linux

Download the appropriate package from here.

Use either the debian package or the tarball

Manual Installation

Download the latest tar.gz and run install.sh

Development

Tests are run with tox

goreleaser --skip-validate --skip-publish --rm-dist

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

new-project-0.0.5.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

new_project-0.0.5-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file new-project-0.0.5.tar.gz.

File metadata

  • Download URL: new-project-0.0.5.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.1

File hashes

Hashes for new-project-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ddc1e69af80bed24385d53efff12f061aaaa0694de2d3dfbd4616674e0f72038
MD5 08c0143de55a62a2509b3cc678310c54
BLAKE2b-256 11e09ec42ad33c0982cc542c58605a7c0026321bb2bdc521090843adc3c35a99

See more details on using hashes here.

File details

Details for the file new_project-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: new_project-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.1

File hashes

Hashes for new_project-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 174f32c68c776db2d2684da4488c3186b3cbd882b71e1bbd8e11f1d1206f7a8e
MD5 6496b9c3c74a5436dd9d7d86fe0c0f8d
BLAKE2b-256 691a6d5dd150ec5ced8b6e088a1b5e9455d1a2895625660462339afd037d627c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page