Skip to content

Load .env file in .NET Interactive Notebook. This package helps .NET Notebook player custom their environment easier.

Notifications You must be signed in to change notification settings

poychang/DotNetNotebook.EnvMagicCommand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status NuGet version

Env Magic Command

Load .env file in .NET Interactive Notebook. This package helps .NET Notebook player custom their environment easier.

How to use

Try it by running: #!env -f [file-path] -n [variable-name]

You can use #!env --help in .NET Notebook to get help description.

#!env
  Load .env to .NET Interactive Notebook.

Usage:
  [options] #!env

Options:
  -f, --file-path <file-path>  The .env file path
  -n, --var-name <var-name>    The variable name which contain the .env setting
  -?, -h, --help               Show help and usage information

Assume you have a .env file in your project root directory. After install this magic command in .NET Notebook, you can use it like this:

#!env -f ".\.env" -n MyEnv
display(MyEnv["YOUR_VARIABLE"]);

You can find more notebook samples in samples folder.

About

Load .env file in .NET Interactive Notebook. This package helps .NET Notebook player custom their environment easier.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages