Giter Club home page Giter Club logo

nexus-uploader's Introduction

Nexus Mods File Uploader

Because a real API will be ready Soonβ„’

Introduction

This is a small command-line tool that can be used to upload mod files to an existing mod on Nexus Mods.

This is very unofficial and very unsupported. If you want to see an official and supported API for mod authors, open a topic on the forums or in #site-help-feedback on Discord to let Nexus know the demand.

This tool does not automate the web UI, as an existing solution already does a perfectly good job of this (πŸ‘‹ Aragas), but instead recreates the underlying requests to upload a file and add it to an existing mod. It also supports adding/updating changelogs, but this hasn't been tested much.

Installation

You can either download the binary for your platform from the Releases section on the right, or install it using the dotnet CLI:

dotnet tool install -g NexusUploader
# then run with
unex

If your project already has a local tools manifest, you can also install it locally:

dotnet tool install NexusUploader
# then run with
dotnet unex

Configuration and Usage

Since there's a lot of information required when updating mods, the recommended method is to create a configuration file for non-sensitive information and use environment variables just for the sensitive information. That being said, you can mix-and-match keys from the config file or environment variables (just prefix them with UNEX_) at will.

Sample unex.yml:

Game: site
ModId: 163
FileName: Upload Test
FileDescription: |-
  Your file description should go here.

  You can include whatever you like in your description, it's added as-is.

You can also use a JSON configuration file if you prefer, you heathen

The remaining two configuration keys are sensitive and should not be made public, but you need both of them (for hard-to-explain reasons): a valid API key and session cookies. Your API key should be in the UNEX_APIKEY environment variable. Cookies can be provided in two ways:

  • If you have the raw Cookie header from a valid session, you can include the whole header in the UNEX_COOKIES variable
  • If you have an exported cookies.txt file, you can include the relative path to the file in the UNEX_COOKIES variable (like ./cookies.txt)

All relative paths will be parsed relative to the current working directory

Then, call the CLI to begin your upload:

#unex upload <mod-id> <path-to-file> -v <target-version>
unex upload 163 ./Your-Mod-File.zip -v 1.1.2

By default, your mod's main version will be updated to your new file version, but you can skip this using the --no-version-update option.

You can optionally upload your file as a replacement for an existing file, by providing the PreviousFile configuration key. Set it to a file ID to directly replace that file, or to "auto" to replace the highest-versioned Main File on your mod (this is both highly experimental and only available for published mods).

nexus-uploader's People

Contributors

agc93 avatar focustense avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nexus-uploader's Issues

Error when preparing to upload

Hey, I tried to update my mod today, but I keep getting this error

C:\test>unex upload 2132 test.zip -v 123
| INFO|: Attempting to retrieve game details for 'cyberpunk2077'
| INFO|: Game details loaded: cyberpunk2077/3333
| INFO|: Preparing to upload 'test.zip' to Nexus Mods upload API

Error: I don't even know what this means

Any idea what's wrong?

[Question]: does it still work?

I used this tool year or two ago and it worked just fine. But it doesn't seem to work today.
Are there any plans to update it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.