Skip to main content

A CLI for publishing sites to Netlify and assigning custom domains to them.

Project description

What Can Publify Do?

The coolest thing publify can do is publish a folder of static web pages and supporting assets to the web using Netlify, including adding a custom subdomain!

Here's the full menu, though, with more details under the headings below:

> pub help

Usage:
    pub help
    pub <rootpath> [<custom_domain>]             --------------------------------> deploy a site
    pub list                                     -------------------------------> list all sites
    pub custom <custom_domain> <existing_domain> --------------------------> set a custom domain
    pub remove-custom <custom_domain>            -----------------------> remove a custom domain
    pub delete/remove <domain or custom_domain>  --------------------------------> delete a site

Publish Sites to Netlify via CLI!

> ls mysite
└── folder
    ├── index.html
    ├── another_page.html
    ├── styles.css
    └── a.jpg
>
> pub mysite/
the site is published: http://6426ed336771f2380224fb84--scintillating-mochi-760bd3.netlify.app

Publish Sites to Netlify With Custom Subdomains Too!

> pub mysite dude.helpers.fun
the site is published: http://6426ee6a10e4e43866b46a42--startling-gingersnap-425138.netlify.app
the site is published at dude.helpers.fun.

If you only have one domain set up with Netlify, there's no need to include anything but the subdomain part:

> pub mysite/ dudette
the site is published: http://642718842cb34f02bc6b0137--cheery-daifuku-f3417f.netlify.app
the site is published at dudette.helpers.fun.

List All Your Sites!

> pub list

sites without custom domains:

cheery-daifuku-f3417f: https://cheery-daifuku-f3417f.netlify.app
preeminent-salamander-6262a7: http://preeminent-salamander-6262a7.netlify.app
scintillating-mochi-760bd3: https://scintillating-mochi-760bd3.netlify.app
transcribely: https://transcribely.netlify.app

sites with custom domains:

euphonious-torrone-029b78: https://shucks.helpers.fun
flourishing-sherbet-8f356e: https://dudettes.helpers.fun
beautiful-meerkat-95c24f: https://duasdfdes.helpers.fun
glittery-khapse-b51104: https://dudes.helpers.fun
velvety-cobbler-d4e023: https://mama.helpers.fun
playful-treacle-6fea54: https://okay.helpers.fun
calm-dodol-b7aea3: https://thedonkey.helpers.fun

Add A Custom Subdomain To An Already Published Site!

> pub custom hey.helpers.fun preeminent-salamander-6262a7.netlify.app
the site is published at hey.helpers.fun. (originally 'preeminent-salamander-6262a7.netlify.app')

You can also provide partial names for the Netlify URLs, and also for the custom domains if you only have one domain listed in NETLIFY_DOMAINS:

> pub custom hey preeminent
the site is published at hey.helpers.fun. (originally 'preeminent-salamander-6262a7.netlify.app')

Remove a Custom Subdomain!

> pub remove-custom hey
'hey.helpers.fun' was removed

Delete An Entire Site!

Powerful stuff:

> pub delete preeminent
site 'http://preeminent-salamander-6262a7.netlify.app' was deleted

But First, a Bit of Configuration

To do this magic, you have to first

  1. Create an environment variable NETLIFY_TOKEN, obtained here.
  2. Create an environment variable NETLIFY_DOMAINS, with comma-separated values (no spaces), if you're planning to use custom domains.
  3. Delegate DNS management of all domains listed in DOMAINS to Netlify (link)

TODO

  • add some color and spinners to the CLI using Rich

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

publify-0.2.5.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

publify-0.2.5-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file publify-0.2.5.tar.gz.

File metadata

  • Download URL: publify-0.2.5.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for publify-0.2.5.tar.gz
Algorithm Hash digest
SHA256 8b638acf9bc1def3286c650424b7baf67ef2b5e0bed953f3a343b17e88a1135a
MD5 6da26d6f4da6ff4c03ebe9597c28541c
BLAKE2b-256 7f0c756a286cfdcebf3ace74cd612999afbad5619ac264e8e3348ca33e3d98f0

See more details on using hashes here.

File details

Details for the file publify-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: publify-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for publify-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 50450a21aee31efae2c13800956561d7b8e3520178f2f34d267691b7ee225ca2
MD5 efd68569dfd6f8edb7266133327d9695
BLAKE2b-256 1197ba21ef03af3d6c408d0d3139650713d467ebdf85fa0cdf3606f692acdd58

See more details on using hashes here.

Supported by

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